<?php $self = 'self' . time() . rand(1, 10000); ?>
<style type="text/css">
    #ajaxAddTaskOperateForm .form-body .form-group {
        width: 50%;
        float: left;
    }

    #ajaxAddTaskOperateForm .form-body .form-group .col-xs-3 {
        width: 45%;
    }

    #ajaxAddTaskOperateForm .form-body .form-group .col-xs-4 {
        width: 45%;
    }

    .ECalendarBox {
        z-index: 100;
    }

    .ECalendarBox .currentdate h2 {
        margin-top: 0px;
    }

    .modal-dialog {
        width: 1280px;
    }

    td {
        text-align: center;
    }

    tr{
        line-height: 35px;
    }
    .modal_image_list .form-group {
        float: left;
        margin-top: 30px;
    }

    .modal_image_list img {
        float: left;
        margin-left: 30px;
    }
</style>
<link href="<?= image_url('/static/assets/global/css/ecalendar-style.css') ?>" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<?= image_url('/static/js/Ecalendar.jquery.min.js') ?>"></script>
<script type="text/javascript" src="<?=image_url('/static/assets/global/scripts/zoomify.min.js')?>"></script>
<link rel="stylesheet" type="text/css" href="<?=image_url('/static/assets/global/css/zoomify.min.css')?>"/>
<div class="portlet-body form">
    <div class="form-body">
        <div class="table-scrollable">
            <table class="table table-hover table-bordered table-striped">
                <tr>
                    <td align="right" width="10%">测评记录ID：</td>
                    <td class="bold" width="15%"><?= $obj->id ?></td>
                    <td align="right" width="10%">任务ID：</td>
                    <td class="bold" width="15%"><?= $obj->task_id ?> - <a href="<?= site_url('/tasks/task/view/' . $obj->task_id) ?>" target="_blank">查看</a></td>
                    <td align="right" width="10%">ASIN：</td>
                    <td class="bold" width="15%"><?= $obj->asin ?></td>
                    <td align="right">商品实价：</td>
                    <td class="bold"><?= $obj->true_product_price > 0 ? number_format($obj->true_product_price, 3, '.', '') : '' ?> <?= IOSS_StaticConfig::getcoinTypeInfo($obj->buyer_pay_coin_type) ?></td>

                </tr>
                <tr>
                    <td align="right" width="10%">接单者：</td>
                    <td class="bold" width="15%"><?= $allReviewsAdmin[$obj->operator_id] ?></td>
                    <td align="right" width="10%">关联财务操作人：</td>
                    <td class="bold" width="15%"><?= $allFanaceAdmin[$obj->finace_id] ?></td>
                    <td align="right">买家下单号：</td>
                    <td class="bold"><?= $obj->order_no ?></td>
                    <td align="right" width="10%">创建时间：</td>
                    <td class="bold" width="15%"><?= date('Y-m-d H:i:s', $obj->create_time) ?></td>
                </tr>
                <tr>
                    <td align="right">买家实际支付：</td>
                    <td class="bold text-center"><?=number_format($obj->buyer_pay_total,2)?> <?= IOSS_StaticConfig::getcoinTypeInfo($obj->buyer_pay_coin_type) ?></td>
                    <td align="right">买家付款方式：</td>
                    <td class="bold text-center"><?= IOSS_StaticConfig::getPayMethod($obj->pay_method) ?></td>
                    <td align="right">买家下单日期：</td>
                    <td class="bold"><?= $obj->buyer_order_time > 0 ? date('Y-m-d', $obj->buyer_order_time) : '未填写' ?></td>
                    <td align="right">买家付款日期：</td>
                    <td class="bold"><?= $obj->buyer_pay_time > 0 ? date('Y-m-d', $obj->buyer_pay_time) : '未填写' ?></td>
                </tr>

                <tr>
                    <td align="right">评论链接：</td>
                    <td class="bold"><?php if ($obj->comment_link): ?><a href="<?= $obj->comment_link ?>" target="_blank" class="btn blue">查看</a><?php else: ?>未填<?php endif; ?></td>
                    <td align="right">凭证：</td>
                    <td colspan="5">
                        <?php if ($obj->add_image): ?>
                            <?php if (strstr($obj->add_image, 'doc') || strstr($obj->add_image, 'xls')): ?>
                                <a href="<?= image_url('/' . $obj->add_image) ?>">
                                    <img  title="<?= $obj->add_image ?>" src="/static/img/docx.png" width="auto" height="80"/>
                                </a>
                            <?php elseif (strstr($obj->add_image, 'zip') || strstr($obj->add_image, 'rar')): ?>
                                <a href="<?= image_url('/' . $obj->add_image) ?>">
                                    <img  title="<?= $obj->add_image ?>" src="/static/img/zip.png" width="auto" height="80"/>
                                </a>
                            <?php else: ?>
                                <img  src="<?= image_url($obj->add_image) ?>" width="auto" height="80" class="modal-img img-rounded zoomify"/>
                            <?php endif; ?>
                        <?php else: ?>
                            <?= edit_form_uploader('add_image_' . $obj->id, set_uploader('add_image', $obj->add_image), '') ?>
                        <?php endif; ?>
                        <?php if ($obj->add_image_1): ?>
                            <?php if (strstr($obj->add_image_1, 'doc') || strstr($obj->add_image_1, 'xls')): ?>
                                <a href="<?= image_url('/' . $obj->add_image_1) ?>">
                                    <img title="<?= $obj->add_image_1 ?>" src="/static/img/docx.png" width="auto" height="80"/>
                                </a>

                            <?php elseif (strstr($obj->add_image_1, 'zip') || strstr($obj->add_image_1, 'rar')): ?>
                                <a href="<?= image_url('/' . $obj->add_image_1) ?>">
                                    <img title="<?= $obj->add_image_1 ?>" src="/static/img/zip.png" width="auto" height="80"/>
                                </a>
                            <?php else: ?>
                                <img src="<?= image_url($obj->add_image_1) ?>" width="auto" height="80" class="modal-img img-rounded zoomify"/>
                            <?php endif; ?>
                        <?php else: ?>
                            <?= edit_form_uploader('add_image_1_' . $obj->id, set_uploader('add_image_1', $obj->add_image_1), '') ?>
                        <?php endif; ?>
                        <?php if ($obj->add_image_2): ?>
                            <?php if (strstr($obj->add_image_2, 'doc') || strstr($obj->add_image_2, 'xls')): ?>
                                <a href="<?= image_url('/' . $obj->add_image_2) ?>">
                                    <img title="<?= $obj->add_image_2 ?>" src="/static/img/docx.png" width="auto" height="80" />
                                </a>
                            <?php elseif (strstr($obj->add_image_2, 'zip') || strstr($obj->add_image_2, 'rar')): ?>
                                <a href="<?= image_url('/' . $obj->add_image_2) ?>">
                                    <img title="<?= $obj->add_image_2 ?>" src="/static/img/zip.png" width="auto" height="80"/>
                                </a>
                            <?php else: ?>
                                <img src="<?= image_url($obj->add_image_2) ?>" width="auto" height="80"  class="modal-img img-rounded zoomify"/>
                            <?php endif; ?>
                        <?php else: ?>
                            <?= edit_form_uploader('add_image_2_' . $obj->id, set_uploader('add_image_2', $obj->add_image_2), '') ?>
                        <?php endif; ?>
                    </td>
                </tr>
                <tr>
                    <td align="right">测评类型：</td>
                    <td class="bold"><?= $obj->ceping_type == 0?'未标记':($obj->ceping_type == 1?'销量':'测评'); ?></td>
                    <td align="right">留评时间：</td>
                    <td class="bold" colspan="2"><?= date('Y-m-d', $obj->review_time) ?></td>
                    <td align="right">备注：</td>
                    <td class="bold" colspan="3"><?=$obj->remark ?></td>
                </tr>
                <?php
                $payment_type = array('1'=>'货款','2'=>'买家佣金','3'=>'中介佣金');
                $item_status = array('0'=>'待提交财务','1'=>'财务待处理','2'=>'财务标定异常','3'=>'财务已处理打款');
                ?>
                <?php foreach($recordsItems as $k=>$item):?>
                    <tr>
                        <td colspan="8" style="color:#e20000;text-align: left;font-weight: bold;"><?=$payment_type[$item->payment_type]?> — <?=$item_status[$item->status]?></td>
                    </tr>
                    <tr>
                        <td align="right">联系方式：</td>
                        <td class="bold"><?=$item->contact?></td>
                        <td align="right">收款账号：</td>
                        <td class="bold"><?=$item->pay_account?></td>
                        <td align="right">款项金额：</td>
                        <td class="bold"><?=$item->amount?> <?=IOSS_StaticConfig::getcoinTypeInfo($item->coin_type)?></td>
                        <td align="right">对RMB汇率：</td>
                        <td class="bold"><?=$item->rate_rmb?></td>
                    </tr>
                    <tr>
                        <td align="right">创建时间：</td>
                        <td class="bold"><?=date('Y-m-d h:i:s',$item->create_time)?></td>
                        <td align="right">更新时间：</td>
                        <td class="bold"><?=date('Y-m-d h:i:s',$item->update_time)?></td>
                        <td align="right">备注信息：</td>
                        <td class="bold" colspan="3"><?=$item->remark?></td>
                    </tr>
                <?php endforeach;?>
            </table>
        </div>
    </div>
</div>
<script type="javascript">


</script>


